import http from "@/utils/http";
import type {AssignmentConfigData, AssignmentData} from "@/apis";

/**
 * 获取分配配置列表
 */
export const allocationConfigList = () => {
  return http.get<AssignmentData[]>("/crm/system/selectAssignSettIngPage");
};

/**
 * 详情
 */
export const allocationConfigDetail = (assignId: string | number) => {
  return http.get<AssignmentConfigData>(`/crm/system/getAssignSettIng/${assignId}`);
}

/**
 * 新增/修改
 */
export const saveAllocationConfig = (data:AssignmentConfigData) => {
  return http.post("/crm/system/insertOrUpdate", data);
};


/**
 * 删除
 */
export const delAllocationConfig = (assignId: string | number) => {
  return http.deleteMethod(`/crm/system/deleteByAssignId/${assignId}`);
};
